package config

import "time"

type Yml struct {
	App   App   `yaml:"app"`
	Db    Db    `yaml:"db"`
	Redis Redis `yaml:"redis"`
	Jwt   Jwt   `yaml:"jwt"`
}

type App struct {
	Host string `yaml:"host"`
	Port string `yaml:"port"`
}

type Db struct {
	Driver   string `yaml:"driver"`
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Dbname   string `yaml:"dbname"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Charset  string `yaml:"charset"`
	Prefix   string `yaml:"prefix"`
	TimeZone string `yaml:"timezone"`
}

type Redis struct {
	Driver   string `yaml:"driver"`
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Database int    `yaml:"database"`
	Password string `yaml:"password"`
}

type Jwt struct {
	Secret string
	Expire time.Duration
}
